# coding:utf-8

from PyQt5.QtWidgets import QMainWindow
import ui_serial_monitor
import setting_dialog
from AsynDataListener import AsynDataListener

class SerialMonitorWindow(QMainWindow, ui_serial_monitor.Ui_MainWindow): # 继承界面类及QMainWindow类
    def __init__(self):
        super().__init__()
        self.setupUi(self)# 
        self.StartListen.triggered.connect(self.onClickStartListen)
        self.listener = AsynDataListener("hex_out.txt")
        self.listener.start()
        
    def onClickStartListen(self):
        dialog = setting_dialog.SettingDialog()
        dialog.exec_()
        

